#-------------------------------------------------
#
# Project created by QtCreator 2011-09-25T17:49:53
#
#-------------------------------------------------

QT       += core gui xml network

TARGET = pio
TEMPLATE = app
DESTDIR = ../bin
INCLUDEPATH += ../include

win32 {
    INCLUDEPATH += ../../Pio/thirdparty/include
    LIBS += -L../../Pio/thirdparty/lib
    LIBS += -llibxmp -llibraw -lShell32
    THIRDPARTY_LIBS += ../../Pio/thirdparty/bin/libxmp.dll
    THIRDPARTY_LIBS += ../../Pio/thirdparty/bin/libraw.dll
    CONFIG(debug, debug|release) {
        THIRDPARTY_LIBS += $${QMAKE_LIBDIR_QT}/QtCored4.dll
        THIRDPARTY_LIBS += $${QMAKE_LIBDIR_QT}/QtGuid4.dll
        THIRDPARTY_LIBS += $${QMAKE_LIBDIR_QT}/QtXmld4.dll
        THIRDPARTY_LIBS += $${QMAKE_LIBDIR_QT}/QtNetworkd4.dll
    }
    CONFIG(release, debug|release) {
        THIRDPARTY_LIBS += $${QMAKE_LIBDIR_QT}/QtCore4.dll
        THIRDPARTY_LIBS += $${QMAKE_LIBDIR_QT}/QtGui4.dll
        THIRDPARTY_LIBS += $${QMAKE_LIBDIR_QT}/QtXml4.dll
        THIRDPARTY_LIBS += $${QMAKE_LIBDIR_QT}/QtNetwork4.dll
    }
    THIRDPARTY_LIBS ~= s,/,\\,g
    DESTDIR_WIN = $${DESTDIR}
    DESTDIR_WIN ~= s,/,\\,g
    for(FILE,THIRDPARTY_LIBS){
        QMAKE_POST_LINK += $$quote(cmd /c copy /y $${FILE} $${DESTDIR_WIN}$$escape_expand(\\n\\t))
    }
}
unix {
    INCLUDEPATH += ../../libxmp
    LIBS  += -L../../libxmp -lxmp
    LIBS += -lexiv2 -lraw -lgomp
    #DEFINES += UNIX_ENV
    #INCLUDEPATH += ../../XMP-Toolkit-SDK-CS6/public/include
    #LIBS  += -lexiv2 -lraw -lgomp ../../XMP-Toolkit-SDK-CS6/public/libraries/i80386linux/release/staticXMPCore.ar ../../XMP-Toolkit-SDK-CS6/public/libraries/i80386linux/release/staticXMPFiles.ar
}

SOURCES += main.cpp\
        mainwindow.cpp \
    collectionview.cpp \
    scrollarea.cpp \
    droplistwidget.cpp \
    imageloader.cpp \
    imageview.cpp \
    filterbank.cpp \
    tools.cpp \
    sha256.c \
    mediaitemimpl.cpp \
    piocoreimpl.cpp \
    stackedwidget.cpp \
    importdialog.cpp \
    importprocess.cpp \
    aboutdialog.cpp \
    thumbnailengine.cpp \
    iconcache.cpp \
    database.cpp \
    scanner.cpp \
    keywordtreewidget.cpp

HEADERS  += mainwindow.h \
    collectionview.h \
    scrollarea.h \
    droplistwidget.h \
    imageloader.h \
    imageview.h \
    tools.h \
    filterbank.h \
    sha256.h \
    mediaitemimpl.h \
    piocoreimpl.h \
    ../include/mediaitem.h \
    ../include/piocore.h \
    ../include/pioplugin.h \
    stackedwidget.h \
    ../include/importmodule.h \
    importdialog.h \
    importprocess.h \
    aboutdialog.h \
    thumbnailengine.h \
    iconcache.h \
    database.h \
    scanner.h \
    keywordtreewidget.h

FORMS    += mainwindow.ui \
    importdialog.ui \
    aboutdialog.ui

TRANSLATIONS += pio-de_DE.ts

!isEmpty(TRANSLATIONS) {
    isEmpty(QMAKE_LRELEASE) {
        win32:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]\\lrelease.exe
        else:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]/lrelease
    }
    isEmpty(TS_DIR):TS_DIR = translations
    TSQM.name = lrelease ${QMAKE_FILE_IN}
    TSQM.input = TRANSLATIONS
    TSQM.output = $$TS_DIR/${QMAKE_FILE_BASE}.qm
    TSQM.commands = $$QMAKE_LRELEASE ${QMAKE_FILE_IN} -qm $$DESTDIR/${QMAKE_FILE_BASE}.qm
    TSQM.CONFIG = no_link
    QMAKE_EXTRA_COMPILERS += TSQM
    PRE_TARGETDEPS += compiler_TSQM_make_all
} else:message(No translation files in project)

RESOURCES += \
    resource.qrc
